package nbcb;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class O {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n, m;
        List<Integer> list = new ArrayList<>();
        while (sc.hasNext()) {
            list.clear();
            n = sc.nextInt();
            m = sc.nextInt();
            if (n == 0 && m == 0) continue;
            list.add(m);
            for (int i = 0; i < n; i++) {
                list.add(sc.nextInt());
            }
            Collections.sort(list);
            for (int num : list) {
                System.out.print(num + " ");
            }
        }
    }
}
